﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Text;

namespace 树
{
    class Player : IComparable<Player>
    {
        public string name { get; }

        public int id { get; }

        public Player(int id, string name)
        {
            this.name = name;
            this.id = id;
        }

        public override string ToString()
        {
            return id.ToString();
        }

        public int CompareTo([AllowNull] Player other)
        {
            return id - other.id;
        }
    }
}
